package com.jianying.mapper;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.jianying.base.BaseMapper;
import com.jianying.dataSource.TargetDataSource;
import com.jianying.domain.Enumeration;

@Repository("enumerationMapper")
public class EnumerationMapper extends BaseMapper {

	private final static String NAME_SPACE = "com.jianying.mapper.EnumerationMapper.";
	
	@TargetDataSource(name="ds1")
	public void insertBatch(List<Enumeration> enumerations) {
		getSqlSessionTemplate().insert(NAME_SPACE + "insertBatch", enumerations);
	}
	
	public List<Enumeration> all(Integer tenantId) {
		return getSqlSessionTemplate().selectList(NAME_SPACE + "all", tenantId);
	}

}
